home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / type_amiga.h < prev    next >
C/C++ Source or Header  |  2001-05-12  |  1KB  |  82 lines

  1.  
  2. #ifndef _TEK_TYPE_H
  3. #define    _TEK_TYPE_H 1
  4.  
  5. /*
  6. **    type.h
  7. **    types and constants for AmigaOS 3.x
  8. */
  9.  
  10. #include <sys/types.h>
  11. #include <netinet/in.h>
  12.  
  13.  
  14. /*
  15. **    platform specific
  16. */
  17.  
  18. typedef char                TBYTE;
  19. typedef signed char            TINT8;
  20. typedef unsigned char        TUINT8;
  21. typedef signed short        TINT16;
  22. typedef unsigned short        TUINT16;
  23. typedef signed int            TINT;
  24. typedef unsigned int        TUINT;
  25. typedef float                TFLOAT;
  26. typedef    double                TDOUBLE;
  27.  
  28. #define    TALIGN_MINOR        3
  29. #define TALIGN_DEFAULT        7
  30. #define TALIGN_MAJOR        15
  31.  
  32. #define __ELATE_QCALL__(x)
  33.  
  34. #ifdef TDEBUG
  35.     void kprintf(char *, ...);
  36.     #define platform_dbprintf(a)        kprintf(a)
  37.     #define platform_dbprintf1(a,b)        kprintf(a,b)
  38.     #define platform_dbprintf2(a,b,c)    kprintf(a,b,c)
  39. #endif
  40.  
  41.  
  42.  
  43. /*
  44. **    not platform specific
  45. */
  46.  
  47. typedef void                TVOID;
  48. typedef void *                TAPTR;
  49. typedef TBYTE *                TSTRPTR;
  50. typedef TUINT                TBOOL;
  51. typedef struct
  52. {TBYTE data[16];}            TKNOB;
  53.  
  54. typedef struct                /* time/datestamp */
  55. {
  56.     TUINT sec;                /* seconds */
  57.     TUINT usec;                /* microseconds */
  58. }    TTIME;
  59.  
  60.  
  61.  
  62. #define TNULL                0
  63. #define TTRUE                1
  64. #define TFALSE                0
  65. #define TABS(a)                ((a)>0?(a):-(a))
  66. #define TMIN(a,b)            ((a)<(b)?(a):(b))
  67. #define TMAX(a,b)            ((a)>(b)?(a):(b))
  68. #define TCLAMP(min,x,max)    ((x)>(max)?(max):((x)<(min)?(min):(x)))
  69. #define TPI                    3.14159265358979323846
  70.  
  71.  
  72. #ifdef __cplusplus
  73.     #define TBEGIN_C_API extern "C" {
  74.     #define TEND_C_API }
  75. #else
  76.     #define TBEGIN_C_API
  77.     #define TEND_C_API
  78. #endif
  79.  
  80.  
  81. #endif
  82.